< previous page page_400 next page >

Page 400
Ive modeled this example after the TextStream class, which is part of the FileSystem objects that come with Visual Basic for Applications. Table 20.1 presents the Private variables youll declare in the General Declarations section of the TextStream class.
Table 20.1 Private Variables of the TextStream Class.
VariablesDescription
mintHandleThe file handle thats retrieved from the operating system. This is a private data item that will not be made public.
mstrFileNameThe filename you want to read data from or write data to.
mintOpenModeThe mode in which you want to open the file. You can choose to open a file for appending data or for reading data. Youll specify this by using an enumerated constant.
mintFormatYou can choose the format for opening the file. This property does not actually work in this exampleits just here for compatibility with the real TextStream object in the FileSystem objects.
mboolEOFThis property return True when you hit the end of the file.

Table 20.2 lists the Public properties that will be exposed to the outside world by the TextStream class.
Table 20.2 Public Properties of the TextStream Class.
PropertyDescription
AtEndOfStreamThis method returns True when youre at the end of the file.
FileNameThe filename you want to read data from or write data to.
FileTooBigReturns True if the file is greater than 32KB in length.

Table 20.3 lists the methods that will be implemented in the TextStream class.

 
< previous page page_400 next page >

If you like this book, buy it!